Skip to content

chore(cli): replace temp with native mkdtemp#7429

Open
Dame5211 wants to merge 1 commit into
refinedev:mainfrom
Dame5211:codex/replace-temp-with-mkdtemp
Open

chore(cli): replace temp with native mkdtemp#7429
Dame5211 wants to merge 1 commit into
refinedev:mainfrom
Dame5211:codex/replace-temp-with-mkdtemp

Conversation

@Dame5211
Copy link
Copy Markdown

Summary

  • replace the CLI temp package usage in resource generation with native fs.mkdtempSync
  • clean up the temporary resource directory with the existing fs-extra utilities
  • remove the direct temp and @types/temp dependencies from @refinedev/cli

Closes #7375.

Verification

  • pnpm --filter @refinedev/cli test -- src/commands/add/sub-commands/resource/index.test.ts
  • pnpm biome check packages/cli/src/commands/add/sub-commands/resource/create-resources.ts packages/cli/package.json
  • git diff --check

Notes

  • pnpm --filter @refinedev/cli build completed the tsup CJS/ESM bundle step, then failed during declaration generation because this filtered install did not have prebuilt @refinedev/devtools-server workspace declarations available.

Constraint: CLI resource generation only needs a temporary directory and the package targets Node versions with native fs.mkdtemp support

Rejected: swap temp for another temp-directory package | native Node APIs avoid a direct runtime dependency

Confidence: high

Scope-risk: narrow

Directive: Keep CLI temporary directory handling on native fs APIs unless cleanup semantics change

Tested: pnpm --filter @refinedev/cli test -- src/commands/add/sub-commands/resource/index.test.ts

Tested: pnpm biome check packages/cli/src/commands/add/sub-commands/resource/create-resources.ts packages/cli/package.json

Tested: git diff --check

Not-tested: pnpm --filter @refinedev/cli build (declaration generation requires prebuilt devtools workspace packages in this filtered install)

Co-authored-by: OmX <omx@oh-my-codex.dev>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

⚠️ No Changeset found

Latest commit: 23ac421

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal: replace temp npm package

1 participant